/* Road to Par Golf App Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

.rtp-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: #F5F5F5;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px; /* Space for bottom navigation */
}

/* Loading indicator */
.rtp-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.rtp-loading.active {
    display: block;
}

.rtp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E0E0E0;
    border-top: 4px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.rtp-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 90%;
}

.rtp-message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rtp-message.success {
    background: #4CAF50;
    color: white;
}

.rtp-message.error {
    background: #FF5722;
    color: white;
}

/* Content area */
.rtp-content {
    padding: 20px;
}

/* Header */
.rtp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.rtp-title {
    font-size: 24px;
    font-weight: 600;
    color: #212121;
    margin: 0;
}

/* Buttons */
.rtp-btn {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.rtp-btn:hover {
    background: #1B5E20;
}

.rtp-btn:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
}

.rtp-btn-secondary {
    background: #757575;
}

.rtp-btn-secondary:hover {
    background: #616161;
}

.rtp-btn-danger {
    background: #FF5722;
}

.rtp-btn-danger:hover {
    background: #E64A19;
}

.rtp-btn-icon {
    background: transparent;
    color: #2E7D32;
    padding: 8px;
    font-size: 18px;
    min-width: auto;
}

.rtp-btn-icon:hover {
    background: rgba(46, 125, 50, 0.1);
}

/* Forms */
.rtp-form {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rtp-form-section {
    margin-bottom: 30px;
}

.rtp-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 20px;
    border-bottom: 2px solid #E8F5E8;
    padding-bottom: 10px;
}

.rtp-form-group {
    margin-bottom: 20px;
}

.rtp-form-group label {
    display: block;
    font-weight: 500;
    color: #424242;
    margin-bottom: 8px;
}

.rtp-form-group input[type="text"],
.rtp-form-group input[type="date"],
.rtp-form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.rtp-form-group input:focus {
    outline: none;
    border-color: #2E7D32;
}

.rtp-form-group input:disabled {
    background: #F5F5F5;
    color: #757575;
}

/* Shot groups */
.rtp-shot-group {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #2E7D32;
}

.rtp-shot-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2E7D32;
    margin: 0 0 10px 0;
    text-transform: capitalize;
}

.rtp-shot-inputs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rtp-input-group {
    flex: 1;
    min-width: 120px;
}

.rtp-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: #616161;
    margin-bottom: 6px;
    display: block;
}

/* Number inputs with +/- buttons */
.rtp-number-input {
    display: flex;
    align-items: center;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
}

.rtp-number-input input {
    border: none;
    padding: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    min-width: 50px;
}

.rtp-number-input input:focus {
    outline: none;
}

.rtp-number-input input:disabled {
    background: #F5F5F5;
    color: #757575;
}

.rtp-btn-minus,
.rtp-btn-plus {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 8px 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rtp-btn-minus:hover,
.rtp-btn-plus:hover {
    background: #1B5E20;
}

.rtp-btn-minus:disabled,
.rtp-btn-plus:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
}

/* Form actions */
.rtp-form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E0E0E0;
}

/* Overview styles */
.rtp-rounds-list {
    display: grid;
    gap: 20px;
}

.rtp-round-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.rtp-round-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.rtp-round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rtp-round-date {
    font-size: 18px;
    font-weight: 600;
    color: #2E7D32;
}

.rtp-round-actions {
    display: flex;
    gap: 8px;
}

.rtp-round-info {
    margin-bottom: 15px;
}

.rtp-round-course {
    font-size: 16px;
    font-weight: 500;
    color: #424242;
}

.rtp-round-holes {
    font-size: 14px;
    color: #757575;
}

.rtp-round-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.rtp-stat {
    text-align: center;
    padding: 12px;
    background: #F8F8F8;
    border-radius: 6px;
}

.rtp-stat-label {
    display: block;
    font-size: 12px;
    color: #757575;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 500;
}

.rtp-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2E7D32;
}

.rtp-percentage {
    font-size: 20px;
}

/* Statistics styles */
.rtp-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rtp-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 20px;
}

.rtp-focus-shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.rtp-focus-card {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.rtp-focus-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.rtp-focus-percentage {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.rtp-focus-details {
    font-size: 14px;
    opacity: 0.9;
}

.rtp-chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

/* Empty state */
.rtp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

.rtp-empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Bottom navigation */
.rtp-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: white;
    border-top: 1px solid #E0E0E0;
    display: flex;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.rtp-nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #757575;
}

.rtp-nav-btn:hover {
    background: rgba(46, 125, 50, 0.05);
}

.rtp-nav-btn.active {
    color: #2E7D32;
    background: rgba(46, 125, 50, 0.1);
}

.rtp-nav-icon {
    font-size: 20px;
}

.rtp-nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 600px) {
    .rtp-content {
        padding: 15px;
    }
    
    .rtp-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rtp-title {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .rtp-shot-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .rtp-input-group {
        min-width: auto;
    }
    
    .rtp-form-actions {
        flex-direction: column;
    }
    
    .rtp-form-actions .rtp-btn {
        width: 100%;
    }
    
    .rtp-round-stats {
        grid-template-columns: 1fr;
    }
    
    .rtp-focus-shots {
        grid-template-columns: 1fr;
    }
    
    .rtp-chart-container {
        height: 300px;
    }
}

@media (max-width: 400px) {
    .rtp-nav-label {
        display: none;
    }
    
    .rtp-nav-btn {
        padding: 15px 8px;
    }
    
    .rtp-nav-icon {
        font-size: 22px;
    }
}

/* Utility classes */
.rtp-hidden {
    display: none !important;
}

.rtp-text-center {
    text-align: center;
}

.rtp-mb-0 {
    margin-bottom: 0 !important;
}

.rtp-mt-20 {
    margin-top: 20px !important;
}
