﻿/* ==========================================================================
   SHOT ENTRY MODULE STYLES - ShotLogger Golf App
   Streamlined Flow Version
   ========================================================================== */

/* ==========================================================================
   SHOT ENTRY MODAL
   ========================================================================== */

.shot-entry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-modal);
    backdrop-filter: blur(5px);
}

.shot-entry-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.shot-entry-screen {
    background: var(--bg-modal);
    border-radius: 15px;
    padding: 20px;
    max-width: 100%;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: var(--shadow-primary);
    border: 2px solid var(--border-primary);
    position: relative;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.shot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid var(--border-secondary);
    margin-bottom: 20px;
}

.navigation-controls-centered {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.hole-shot-info {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-accent);
    text-align: center;
    min-width: 180px;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-section);
    color: var(--text-secondary);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-btn:hover:not(:disabled) {
    background: var(--bg-hole-btn-hover);
    border-color: var(--border-accent);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.close-shot-entry {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    color: #dc2626;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
    font-weight: bold;
}

.close-shot-entry:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    transform: scale(1.1);
}

/* ==========================================================================
   STREAMLINED FLOW INSTRUCTION
   ========================================================================== */

#flowInstruction {
    text-align: center;
    padding: 15px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    transition: opacity var(--transition-normal);
    position: relative;
}

#flowInstruction::before {
    content: '💡';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* ==========================================================================
   GRID SECTIONS
   ========================================================================== */

.clubs-section, 
.positions-section,
.actions-section {
    margin-bottom: 20px;
}

.club-row, 
.position-row, 
.action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

/* ==========================================================================
   CLUB BUTTONS
   ========================================================================== */

.club-btn {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-section);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 56px;
}

.club-btn:hover {
    background: var(--bg-hole-btn-hover);
    border-color: var(--border-accent);
}

.club-btn.selected {
    background: #3b82f6;
    border-color: #2563eb;
    color: white;
}

/* Quick Putt Button Enhancement */
.club-btn.quick-putt-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    font-weight: 700;
}

.club-btn.quick-putt-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #047857 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   POSITION BUTTONS
   ========================================================================== */

.position-btn {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-section);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 56px;
}

.position-btn:hover:not(:disabled) {
    background: var(--bg-hole-btn-hover);
    border-color: var(--border-accent);
}

.position-btn.selected {
    background: #3b82f6;
    border-color: #2563eb;
    color: white;
}

/* Disabled Position Button States for Streamlined Flow */
.position-btn:disabled,
.position-btn.btn-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: var(--bg-section) !important;
    border-color: var(--border-secondary) !important;
    color: var(--text-tertiary) !important;
    transform: none !important;
}

.position-btn:disabled:hover,
.position-btn.btn-disabled:hover {
    background: var(--bg-section) !important;
    border-color: var(--border-secondary) !important;
    transform: none !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   ACTION BUTTONS
   ========================================================================== */

.action-btn {
    flex: 1;
    padding: 20px 16px;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    min-height: 64px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.action-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.action-btn.warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.action-btn.danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.action-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.action-btn.success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.action-btn.update {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.action-btn.update:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.action-btn.secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

.action-btn.wide {
    flex: 2;
}

/* Disabled Button States */
.action-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.action-btn.primary:disabled {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

.action-btn.danger:disabled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.action-btn.warning:disabled {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

.action-btn.success:disabled {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.action-btn.update:disabled {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
}

.action-btn.secondary:disabled {
    background: #9ca3af !important;
    opacity: 0.5;
}

/* ==========================================================================
   ADDITIONAL SECTIONS
   ========================================================================== */

.hole-summary {
    text-align: center;
    padding: 16px;
    background: var(--bg-section);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.shot-actions-section,
.hole-actions-section {
    margin-bottom: 15px;
}

.shot-actions-section + .hole-actions-section {
    border-top: 1px solid var(--border-secondary);
    padding-top: 15px;
}

.penalty-indicator {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #d97706;
}

/* ==========================================================================
   STREAMLINED FLOW ENHANCEMENTS
   ========================================================================== */

.position-section-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.position-section-enabled {
    pointer-events: auto;
    opacity: 1;
    animation: enablePositions 0.3s ease-out;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes enablePositions {
    from {
        opacity: 0.6;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes clubSelected {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.club-btn.selected {
    animation: clubSelected 0.3s ease-out;
}

@keyframes positionSelectedAutoSave {
    0% {
        transform: scale(1);
        background: #3b82f6;
    }
    25% {
        transform: scale(1.08);
        background: #10b981;
    }
    50% {
        transform: scale(1.05);
        background: #059669;
    }
    100% {
        transform: scale(1);
        background: #3b82f6;
    }
}

.position-btn.selected {
    animation: positionSelectedAutoSave 0.6s ease-out;
}

/* ==========================================================================
   DARK THEME OVERRIDES
   ========================================================================== */

[data-theme="dark"] #flowInstruction {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    color: #f8fafc;
}

[data-theme="dark"] .club-btn.quick-putt-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: white !important;
}

[data-theme="dark"] .club-btn.quick-putt-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #047857 !important;
}

[data-theme="dark"] .position-btn:disabled,
[data-theme="dark"] .position-btn.btn-disabled {
    background: rgba(51, 65, 85, 0.5) !important;
    border-color: #475569 !important;
    color: #64748b !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 480px) {
    .shot-entry-screen {
        padding: 16px;
        max-height: 98vh;
    }

    .club-btn, 
    .position-btn {
        font-size: 20px;
        padding: 14px 10px;
        min-height: 50px;
    }

    .action-btn {
        font-size: 18px;
        padding: 18px 14px;
        min-height: 58px;
    }

    .hole-shot-info {
        font-size: 20px;
        min-width: 160px;
    }

    .shot-header {
        margin-bottom: 15px;
    }

    .clubs-section, 
    .positions-section, 
    .actions-section {
        margin-bottom: 15px;
    }

    .club-row, 
    .position-row, 
    .action-row {
        gap: 6px;
        margin-bottom: 6px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .close-shot-entry {
        width: 40px;
        height: 40px;
        font-size: 22px;
        padding: 8px;
    }

    .hole-summary {
        font-size: 18px;
        padding: 14px;
    }

    #flowInstruction {
        font-size: 15px;
        padding: 12px;
    }

    #flowInstruction::before {
        font-size: 16px;
        left: 12px;
    }
}

@media (max-width: 375px) {
    .club-btn, 
    .position-btn {
        font-size: 18px;
        padding: 12px 8px;
        min-height: 46px;
    }

    .action-btn {
        font-size: 17px;
        padding: 16px 12px;
        min-height: 54px;
    }

    .club-row, 
    .position-row, 
    .action-row {
        gap: 4px;
    }

    .hole-shot-info {
        font-size: 18px;
        min-width: 140px;
    }

    #flowInstruction {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 320px) {
    .shot-entry-screen {
        padding: 12px;
    }

    .club-btn, 
    .position-btn {
        font-size: 18px;
        padding: 10px 6px;
        min-height: 42px;
    }

    .action-btn {
        font-size: 16px;
        padding: 14px 10px;
        min-height: 50px;
    }

    .hole-shot-info {
        font-size: 16px;
        min-width: 120px;
    }

    .hole-summary {
        font-size: 16px;
        padding: 12px;
    }

    #flowInstruction {
        font-size: 13px;
        padding: 8px;
    }
}