﻿.create-match-page {
    --match-navy: #071a33;
    --match-navy-light: #0b2d57;
    --match-green: #5b8c3b;
    --match-green-dark: #426d2a;
    --match-border: #e2e8f0;
    --match-muted: #6f7b8d;
    --match-soft: #f6f9fc;
    min-height: 100vh;
    background: #f4f7fb;
}

.create-match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 28px 30px;
    border-radius: 22px;
    background: linear-gradient( 135deg, var(--match-navy) 0%, var(--match-navy-light) 100% );
    color: #ffffff;
    box-shadow: 0 15px 38px rgba(7, 26, 51, 0.16);
}

.create-match-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #b9cae2;
    font-size: 0.78rem;
    font-weight: 800;
}

.create-match-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.55rem, 2.8vw, 2.2rem);
    font-weight: 900;
}

.create-match-header p {
    max-width: 760px;
    margin: 0;
    color: #d9e4f2;
    line-height: 1.8;
}

.create-match-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .create-match-header-actions .btn {
        min-width: 150px;
        border-radius: 11px;
        font-weight: 800;
    }

.create-match-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--match-border);
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
}

.create-match-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f5;
}

.create-match-section-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient( 135deg, var(--match-green), var(--match-green-dark) );
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(91, 140, 59, 0.2);
}

.create-match-section-heading h2 {
    margin: 0 0 4px;
    color: #18243a;
    font-size: 1.08rem;
    font-weight: 900;
}

.create-match-section-heading p {
    margin: 0;
    color: var(--match-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.create-match-page .form-label {
    margin-bottom: 7px;
    color: #344155;
    font-size: 0.82rem;
}

.create-match-page .form-control,
.create-match-page .form-select {
    min-height: 44px;
    border-color: #dce3ea;
    border-radius: 10px;
    color: #223047;
    font-size: 0.88rem;
}

.create-match-page textarea.form-control {
    min-height: auto;
}

.create-match-page .form-control:focus,
.create-match-page .form-select:focus {
    border-color: #88aa71;
    box-shadow: 0 0 0 0.2rem rgba(91, 140, 59, 0.13);
}

.create-match-switch {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #e1e7ed;
    border-radius: 11px;
    background: #fafcfd;
}

    .create-match-switch .form-check-input {
        flex: 0 0 auto;
        margin-top: 0;
        margin-left: 10px;
    }

    .create-match-switch .form-check-label {
        color: #364256;
        font-size: 0.82rem;
        font-weight: 800;
    }

.match-teams-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
}

.match-team-picker {
    padding: 18px;
    border: 1px solid #dde5ec;
    border-radius: 16px;
    background: linear-gradient( 180deg, #ffffff 0%, #f9fbfd 100% );
}

.match-team-picker-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

    .match-team-picker-heading h3 {
        margin: 7px 0 0;
        color: #172237;
        font-size: 1rem;
        font-weight: 900;
    }

.match-team-side-badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e9f3e2;
    color: #4a7332;
    font-size: 0.7rem;
    font-weight: 900;
}

    .match-team-side-badge.is-away {
        background: #e8f0ff;
        color: #315e9e;
    }

.match-team-picker-heading .form-check {
    margin: 0;
}

.match-team-picker-heading .form-check-label {
    color: #627085;
    font-size: 0.74rem;
    font-weight: 800;
}

.match-versus-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--match-green);
}

    .match-versus-area span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 58px;
        height: 58px;
        border: 1px solid #dce8d4;
        border-radius: 18px;
        background: #f3f8ef;
        font-size: 1.18rem;
        font-weight: 900;
    }

    .match-versus-area small {
        margin-top: 7px;
        color: #8792a2;
        font-size: 0.72rem;
        font-weight: 800;
    }

.match-score-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.match-score-entry-group {
    padding: 14px;
    border: 1px solid #e1e7ed;
    border-radius: 13px;
    background: #f9fbfc;
}

    .match-score-entry-group h3 {
        margin: 0 0 12px;
        color: #364256;
        font-size: 0.82rem;
        font-weight: 900;
        text-align: center;
    }

.match-score-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 8px;
}

    .match-score-pair > span {
        padding-bottom: 9px;
        color: #8b96a6;
        font-weight: 900;
    }

    .match-score-pair label {
        display: block;
        margin-bottom: 5px;
        color: #7b8797;
        font-size: 0.7rem;
        font-weight: 800;
        text-align: center;
    }

    .match-score-pair input {
        text-align: center;
        font-size: 1rem !important;
        font-weight: 900;
    }

.actual-time-fields {
    position: relative;
}

    .actual-time-fields.is-recommended::after {
        content: "مستحسن للحالة الحالية";
        position: absolute;
        top: -7px;
        left: 12px;
        padding: 2px 7px;
        border-radius: 999px;
        background: #fff2c7;
        color: #8c6800;
        font-size: 0.6rem;
        font-weight: 800;
    }

.create-match-actions {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding: 15px 18px;
    border: 1px solid #dfe6ec;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

    .create-match-actions .btn {
        min-width: 145px;
        border-radius: 10px;
        font-weight: 900;
    }

    .create-match-actions .btn-primary,
    .lookup-modal-content .btn-primary {
        border-color: var(--match-green);
        background: var(--match-green);
    }

        .create-match-actions .btn-primary:hover,
        .lookup-modal-content .btn-primary:hover {
            border-color: var(--match-green-dark);
            background: var(--match-green-dark);
        }

.lookup-modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
}

    .lookup-modal-content .modal-header {
        padding: 17px 20px;
        border-bottom: 1px solid #e9eef3;
        background: #f8fafc;
    }

    .lookup-modal-content .modal-title {
        color: #18243a;
        font-size: 1rem;
        font-weight: 900;
    }

    .lookup-modal-content .modal-body {
        padding: 20px;
    }

.lookup-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 14px;
}

.lookup-result-list {
    display: grid;
    gap: 8px;
    min-height: 100px;
}

.lookup-result-card {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e1e7ed;
    border-radius: 11px;
    background: #ffffff;
    text-align: right;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

    .lookup-result-card:hover {
        transform: translateY(-1px);
        border-color: #98b783;
        background: #f5faf2;
    }

    .lookup-result-card strong {
        color: #263348;
        font-size: 0.87rem;
    }

    .lookup-result-card small {
        color: #7c8796;
        font-size: 0.72rem;
    }

.lookup-message {
    display: grid;
    place-items: center;
    min-height: 100px;
    padding: 18px;
    border: 1px dashed #dce3ea;
    border-radius: 11px;
    color: #8792a2;
    font-size: 0.82rem;
    text-align: center;
}

.create-match-page .input-group .btn {
    white-space: nowrap;
}

.create-match-page .alert ul {
    margin-bottom: 0;
}

@media (max-width: 1199.98px) {
    .match-score-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .create-match-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-teams-builder {
        grid-template-columns: 1fr;
    }

    .match-versus-area {
        min-height: 70px;
    }

        .match-versus-area span {
            width: 50px;
            height: 50px;
        }
}

@media (max-width: 767.98px) {
    .create-match-page .container-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }

    .create-match-header {
        padding: 22px 18px;
        border-radius: 17px;
    }

    .create-match-header-actions,
    .create-match-header-actions .btn {
        width: 100%;
    }

    .create-match-card {
        padding: 17px 14px;
        border-radius: 15px;
    }

    .create-match-section-heading {
        gap: 10px;
    }

    .create-match-section-number {
        width: 32px;
        height: 32px;
    }

    .match-team-picker {
        padding: 14px;
    }

    .match-team-picker-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-score-entry-grid {
        grid-template-columns: 1fr;
    }

    .create-match-actions {
        bottom: 5px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 11px;
    }

        .create-match-actions .btn {
            width: 100%;
            min-width: 0;
        }

    .lookup-search-row {
        grid-template-columns: 1fr;
    }

        .lookup-search-row .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .create-match-actions {
        grid-template-columns: 1fr;
    }

    .create-match-page .input-group {
        display: grid;
        grid-template-columns: 1fr;
    }

        .create-match-page .input-group > .form-control,
        .create-match-page .input-group > .btn {
            width: 100%;
            margin: 0;
            border-radius: 9px !important;
        }

        .create-match-page .input-group > .btn {
            margin-top: 6px;
        }
}
