/**
 * Donation Amount Tracker Admin Styles
 */

/* Current Total Section */
.current-total {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.current-total h2 {
    color: #1d2327;
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
}

.current-total .donation-amount {
    font-size: 36px;
    font-weight: bold;
    color: #2271b1;
    margin: 20px 0;
    padding: 15px;
    background: #f0f6fc;
    border-radius: 6px;
    display: inline-block;
}

.current-total .button {
    margin-top: 15px;
    min-width: 150px;
}

/* Tabs Navigation */
.nav-tab-wrapper {
    margin-bottom: 1em;
    border-bottom: 1px solid #c3c4c7;
    padding-top: 9px;
    padding-bottom: 0;
    line-height: inherit;
}

.nav-tab {
    float: left;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    margin-left: .5em;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.71428571;
    font-weight: 600;
    background: #f0f0f1;
    color: #646970;
    text-decoration: none;
    white-space: nowrap;
}

.nav-tab-active,
.nav-tab:focus,
.nav-tab:hover {
    background: #fff;
    color: #1d2327;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

/* Tab Content */
.tab-content {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-top: none;
    padding: 20px;
    margin-top: -1px;
    border-radius: 0 0 4px 4px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Settings Forms */
.form-table {
    margin-top: 0;
}

.form-table th {
    padding: 20px 10px 20px 0;
    width: 200px;
}

.form-table td {
    padding: 15px 10px;
    vertical-align: middle;
}

.form-table .regular-text {
    width: 25em;
    max-width: 100%;
}

.form-table .description {
    color: #646970;
    font-size: 13px;
    margin: 5px 0 0;
    font-style: italic;
}

/* Preview Section */
.preview-section {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.preview-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #c3c4c7;
    color: #1d2327;
}

.preview-section .preview-box {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-top: 15px;
    min-height: 100px;
}

/* Progress Bar Preview */
.donation-amount-progress {
    margin: 15px 0;
}

.donation-amount-progress .progress-text {
    font-size: var(--progress-font-size, 18px);
    font-weight: bold;
    color: var(--progress-text-color, #2271b1);
    margin-bottom: 5px;
}

.donation-amount-progress .progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: calc(var(--progress-font-size, 18px) * 0.8);
    color: var(--progress-text-color, #2271b1);
}

.donation-amount-progress .progress-percentage {
    font-weight: bold;
}

.donation-amount-progress .progress-goal {
    opacity: 0.8;
}

.donation-amount-progress .progress-bar-container {
    background-color: var(--progress-bar-bg-color, #e5e5e5);
    border-radius: calc(var(--progress-bar-height, 20px) / 2);
    overflow: hidden;
    height: var(--progress-bar-height, 20px);
}

.donation-amount-progress .progress-bar {
    height: 100%;
    background-color: var(--progress-bar-color, #2271b1);
    transition: width 0.3s ease;
    position: relative;
    background-image: linear-gradient(
        45deg, 
        rgba(255,255,255,.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255,255,255,.15) 50%, 
        rgba(255,255,255,.15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: var(--progress-bar-height, 20px) var(--progress-bar-height, 20px);
    animation: progress-bar-stripes 1s linear infinite;
    animation-play-state: var(--progress-animation, running);
}

@keyframes progress-bar-stripes {
    from {
        background-position: var(--progress-bar-height, 20px) 0;
    }
    to {
        background-position: 0 0;
    }
}

/* Color Picker Fields */
.color-picker {
    padding: 0;
    margin: 0;
    width: 65px;
    height: 30px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    cursor: pointer;
}

.color-picker:hover {
    border-color: #2271b1;
}

/* Submit Buttons */
.submit {
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid #c3c4c7;
}

.submit .button-primary {
    min-width: 150px;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .form-table th {
        width: 100%;
        display: block;
        padding-bottom: 0;
    }
    
    .form-table td {
        display: block;
        padding-left: 0;
        padding-right: 0;
    }
    
    .form-table .regular-text {
        width: 100%;
    }
    
    .current-total .donation-amount {
        font-size: 28px;
    }
}

.progress-settings-title {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    color: #1d2327;
    font-size: 1.3em;
}

#progress-bar-settings {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

#progress-bar-settings.visible {
    display: block;
}

#progress-bar-settings .form-table {
    margin-top: 0;
}

#progress-bar-settings .form-table th {
    padding-top: 15px;
    padding-bottom: 15px;
}
