﻿.add-transfer-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(91, 140, 59, 0.08), transparent 30%), linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%);
}

.add-transfer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 27px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.add-transfer-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #5b8c3b;
    font-size: 0.82rem;
    font-weight: 900;
}

.add-transfer-header h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    font-weight: 900;
}

.add-transfer-header p {
    max-width: 760px;
    margin: 10px 0 0;
    color: #697386;
    line-height: 1.8;
}

.add-transfer-back-button {
    min-width: 190px;
    padding: 11px 18px;
    border-radius: 13px;
    font-weight: 800;
}

.transfer-form-card {
    margin-bottom: 20px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
}

.transfer-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf1f5;
}

.transfer-section-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(91, 140, 59, 0.12);
    color: #4c7b30;
    font-weight: 900;
}

.transfer-section-heading h2 {
    margin: 0;
    color: #1c2739;
    font-size: 1.15rem;
    font-weight: 900;
}

.transfer-section-heading p {
    margin: 6px 0 0;
    color: #7b8697;
    font-size: 0.88rem;
    line-height: 1.7;
}

.add-transfer-page .form-label {
    margin-bottom: 7px;
    color: #334155;
    font-size: 0.9rem;
}

.add-transfer-page .form-control,
.add-transfer-page .form-select,
.add-transfer-page .input-group-text {
    min-height: 46px;
    border-color: #dce3eb;
    border-radius: 12px;
}

    .add-transfer-page .form-control:focus,
    .add-transfer-page .form-select:focus {
        border-color: rgba(91, 140, 59, 0.75);
        box-shadow: 0 0 0 0.2rem rgba(91, 140, 59, 0.12);
    }

.add-transfer-page textarea.form-control {
    min-height: 110px;
}

.lookup-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

    .lookup-control .btn {
        min-width: 130px;
        border-radius: 12px;
        font-weight: 800;
    }

.transfer-movement-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 175px minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
}

.movement-club-card {
    padding: 20px;
    border: 1px solid #dfe6ee;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fafcfe);
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

    .movement-club-card.is-disabled {
        opacity: 0.55;
        background: #f3f5f7;
    }

.movement-label {
    display: block;
    margin-bottom: 11px;
    color: #5b8c3b;
    font-size: 0.82rem;
    font-weight: 900;
}

.movement-club-name {
    background: #ffffff !important;
    font-weight: 800;
}

.movement-club-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

    .movement-club-actions .btn {
        flex: 1;
        border-radius: 10px;
        font-size: 0.82rem;
        font-weight: 800;
    }

.movement-arrow-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.movement-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(91, 140, 59, 0.11);
    color: #5b8c3b;
    font-size: 1.55rem;
    font-weight: 900;
}

.movement-arrow-area strong {
    color: #566276;
    font-size: 0.82rem;
    line-height: 1.5;
}

.movement-guidance {
    margin-top: 16px;
    padding: 13px 16px;
    border-right: 4px solid #5b8c3b;
    border-radius: 10px;
    background: rgba(91, 140, 59, 0.075);
    color: #526240;
    font-size: 0.88rem;
    line-height: 1.7;
}

.transfer-switch {
    display: flex;
    align-items: center;
    min-height: 46px;
    margin-top: 31px;
    padding: 10px 14px;
    border: 1px solid #dfe6ee;
    border-radius: 12px;
    background: #fafbfd;
}

    .transfer-switch .form-check-input {
        flex: 0 0 auto;
        margin: 0 0 0 10px;
    }

    .transfer-switch .form-check-label {
        color: #3e4b5f;
        font-weight: 800;
    }

.loan-options-section {
    border-color: rgba(91, 140, 59, 0.3);
}

.add-transfer-actions {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding: 14px;
    border: 1px solid rgba(215, 223, 232, 0.9);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

    .add-transfer-actions .btn {
        min-width: 145px;
        padding: 11px 22px;
        border-radius: 12px;
        font-weight: 900;
    }

.transfer-lookup-modal {
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

    .transfer-lookup-modal .modal-header {
        padding: 20px 22px;
        border-color: #edf1f5;
    }

    .transfer-lookup-modal .modal-title {
        color: #1c2739;
        font-size: 1.15rem;
        font-weight: 900;
    }

.lookup-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-bottom: 16px;
}

    .lookup-search-box .btn {
        min-width: 95px;
        border-radius: 12px;
        font-weight: 800;
    }

.lookup-results-list {
    display: grid;
    gap: 9px;
}

.lookup-result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e7ee;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-align: right;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

    .lookup-result-card:hover,
    .lookup-result-card:focus {
        transform: translateY(-1px);
        border-color: rgba(91, 140, 59, 0.5);
        box-shadow: 0 9px 22px rgba(15, 23, 42, 0.07);
    }

    .lookup-result-card div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .lookup-result-card strong {
        color: #243047;
        font-size: 0.94rem;
        font-weight: 900;
    }

    .lookup-result-card span,
    .lookup-result-card small {
        color: #7c8797;
        font-size: 0.78rem;
    }

.lookup-message {
    padding: 35px 15px;
    border: 1px dashed #d8e0e8;
    border-radius: 14px;
    background: #fafbfd;
    color: #7c8797;
    text-align: center;
}


/* =========================================================
   Fast player selection
   ========================================================= */

.player-selection-section {
    overflow: visible;
}

.player-selection-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.42fr);
    gap: 14px;
    margin-bottom: 18px;
}

.player-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .player-mode-switch.is-disabled {
        opacity: 0.48;
        pointer-events: none;
    }

.player-mode-option,
.new-player-registration-switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #dfe6ee;
    border-radius: 16px;
    background: #fbfcfe;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

    .player-mode-option:hover,
    .new-player-registration-switch:hover {
        transform: translateY(-1px);
        border-color: rgba(91, 140, 59, 0.42);
        box-shadow: 0 9px 22px rgba(15, 23, 42, 0.06);
    }

    .player-mode-option:has(input:checked),
    .new-player-registration-switch:has(input:checked) {
        border-color: rgba(91, 140, 59, 0.7);
        background: rgba(91, 140, 59, 0.075);
        box-shadow: 0 0 0 3px rgba(91, 140, 59, 0.08);
    }

    .player-mode-option input,
    .new-player-registration-switch input {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #5b8c3b;
    }

    .player-mode-option span,
    .new-player-registration-switch span {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .player-mode-option strong,
    .new-player-registration-switch strong {
        color: #273247;
        font-size: 0.91rem;
        font-weight: 900;
    }

    .player-mode-option small,
    .new-player-registration-switch small {
        color: #7c8798;
        font-size: 0.75rem;
        line-height: 1.55;
    }

.new-player-registration-switch {
    border-style: dashed;
}

.player-source-panel {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #e1e7ee;
    border-radius: 18px;
    background: linear-gradient( 180deg, #ffffff 0%, #fafcfe 100% );
}

.new-player-panel {
    border-color: rgba(91, 140, 59, 0.3);
    background: linear-gradient( 180deg, rgba(91, 140, 59, 0.045) 0%, #ffffff 100% );
}

.player-source-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

    .player-source-panel-heading h3 {
        margin: 0;
        color: #243047;
        font-size: 1rem;
        font-weight: 900;
    }

    .player-source-panel-heading p {
        margin: 6px 0 0;
        color: #7b8697;
        font-size: 0.82rem;
        line-height: 1.65;
    }

.fast-entry-badge,
.free-player-badge,
.new-registration-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.fast-entry-badge {
    background: #e9f4e1;
    color: #4d792f;
}

.free-player-badge {
    background: #edf4ff;
    color: #2e5f9b;
}

.new-registration-badge {
    background: #fff4db;
    color: #8b660a;
}

.add-transfer-page .form-text {
    display: block;
    margin-top: 6px;
    color: #8993a3;
    font-size: 0.74rem;
}

.direct-player-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

    .direct-player-search-box .btn {
        min-width: 100px;
        border-radius: 12px;
        font-weight: 800;
    }

.inline-player-results {
    display: grid;
    gap: 8px;
    max-height: 330px;
    margin-top: 12px;
    overflow-y: auto;
}

.inline-player-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #e1e7ee;
    border-radius: 13px;
    background: #ffffff;
    color: inherit;
    text-align: right;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

    .inline-player-result:hover,
    .inline-player-result:focus,
    .inline-player-result.selected {
        transform: translateY(-1px);
        border-color: rgba(91, 140, 59, 0.55);
        background: rgba(91, 140, 59, 0.055);
    }

    .inline-player-result strong {
        color: #263248;
        font-size: 0.9rem;
        font-weight: 900;
    }

    .inline-player-result span {
        color: #7b8697;
        font-size: 0.77rem;
    }

.lookup-message.compact {
    padding: 20px 14px;
}

.new-player-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 46px;
    padding: 10px 13px;
    border-right: 4px solid #5b8c3b;
    border-radius: 11px;
    background: rgba(91, 140, 59, 0.08);
}

    .new-player-note strong {
        color: #466c2e;
        font-size: 0.8rem;
        font-weight: 900;
    }

    .new-player-note span {
        color: #647353;
        font-size: 0.75rem;
        line-height: 1.55;
    }

.selected-player-summary {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed #d8e0e8;
    border-radius: 15px;
    background: #fafbfd;
}

    .selected-player-summary.has-player {
        border-style: solid;
        border-color: rgba(91, 140, 59, 0.35);
        background: rgba(91, 140, 59, 0.055);
    }

.selected-player-summary-label {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e9eef5;
    color: #5e6b7d;
    font-size: 0.7rem;
    font-weight: 900;
}

.selected-player-summary strong {
    color: #273247;
    font-size: 0.94rem;
    font-weight: 900;
}

.selected-player-summary small {
    color: #7a8596;
    font-size: 0.76rem;
}

.selected-player-summary .btn {
    grid-column: 3;
    grid-row: 1 / span 2;
    border-radius: 9px;
    font-size: 0.76rem;
    font-weight: 800;
}

.movement-club-card.is-player-locked {
    border-color: rgba(91, 140, 59, 0.35);
    background: linear-gradient( 180deg, rgba(91, 140, 59, 0.055), #ffffff );
}

    .movement-club-card.is-player-locked::after {
        content: "النادي الحالي للاعب";
        display: inline-flex;
        margin-top: 10px;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(91, 140, 59, 0.1);
        color: #4d792f;
        font-size: 0.68rem;
        font-weight: 900;
    }

@media (max-width: 992px) {
    .add-transfer-header {
        align-items: stretch;
        flex-direction: column;
    }

    .add-transfer-back-button {
        width: 100%;
    }

    .transfer-movement-builder {
        grid-template-columns: 1fr;
    }

    .movement-arrow-area {
        min-height: 80px;
    }

    .movement-arrow {
        transform: rotate(-90deg);
    }
}

@media (max-width: 768px) {
    .transfer-form-card {
        padding: 19px;
    }

    .lookup-control,
    .lookup-search-box {
        grid-template-columns: 1fr;
    }

        .lookup-control .btn,
        .lookup-search-box .btn {
            width: 100%;
        }

    .movement-club-actions {
        flex-direction: column;
    }

    .transfer-switch {
        margin-top: 0;
    }

    .add-transfer-actions {
        position: static;
        flex-direction: column-reverse;
    }

        .add-transfer-actions .btn {
            width: 100%;
        }

    .lookup-result-card {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 1100px) {
    .player-selection-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .player-mode-switch {
        grid-template-columns: 1fr;
    }

    .player-source-panel-heading {
        flex-direction: column;
    }

    .direct-player-search-box {
        grid-template-columns: 1fr;
    }

        .direct-player-search-box .btn {
            width: 100%;
        }

    .selected-player-summary {
        grid-template-columns: 1fr;
    }

        .selected-player-summary-label,
        .selected-player-summary .btn {
            grid-column: auto;
            grid-row: auto;
        }

        .selected-player-summary .btn {
            width: 100%;
        }

    .inline-player-result {
        align-items: flex-start;
        flex-direction: column;
    }
}
