/* Promo Code Manager - Frontend Styles */

.promo-dashboard {
    margin: 20px 0;
}

.promo-dashboard-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.promo-dashboard h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.promo-dashboard h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 20px;
}

/* Verification Form */
.promo-verification-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.promo-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.promo-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.1);
}

.promo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background-color: #0073aa;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.promo-btn:hover {
    background-color: #005a87;
}

.promo-btn:active {
    transform: translateY(1px);
}

.promo-btn-primary {
    background-color: #0073aa;
}

.promo-btn-primary:hover {
    background-color: #005a87;
}

.promo-btn-success {
    background-color: #28a745;
    width: 100%;
    margin-bottom: 10px;
}

.promo-btn-success:hover {
    background-color: #218838;
}

.promo-btn-cancel {
    background-color: #6c757d;
    width: 100%;
}

.promo-btn-cancel:hover {
    background-color: #5a6268;
}

/* Result Section */
.promo-result {
    display: none;
    margin-top: 30px;
    padding: 20px;
    border-radius: 6px;
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
}

.promo-result.active {
    display: block;
}

.promo-details {
    display: none;
}

.promo-details.active {
    display: block;
}

.promo-details > div {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.promo-details > div:last-child {
    border-bottom: none;
}

.promo-details strong {
    color: #333;
    display: inline-block;
    width: 150px;
    font-weight: 600;
}

.promo-details span {
    color: #0073aa;
    font-weight: 500;
}

/* Rules Section */
.promo-rules {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.promo-rules h4 {
    margin-top: 0;
    color: #333;
    font-size: 16px;
}

.promo-rules ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: none;
}

.promo-rules li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #666;
    font-size: 14px;
}

.promo-rules li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Error Message */
.promo-error {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.promo-error.active {
    display: block;
}

/* Redemption Form */
.redemption-form {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 6px;
}

.redemption-form.active {
    display: block;
}

.redemption-form .promo-input {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.redemption-form .promo-btn {
    width: 100%;
}

/* Success Message */
.redemption-success {
    display: none;
    text-align: center;
    padding: 30px;
    background-color: #d4edda;
    border: 2px solid #28a745;
    border-radius: 6px;
    color: #155724;
}

.redemption-success.active {
    display: block;
}

.redemption-success h3 {
    color: #155724;
    margin-top: 0;
}

.redemption-success p {
    font-size: 16px;
    margin: 15px 0;
}

.redemption-success strong {
    color: #0d3622;
    font-weight: 700;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: " ...";
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* Responsive */
@media (max-width: 600px) {
    .promo-dashboard-container {
        padding: 20px;
        margin: 10px;
    }

    .promo-verification-form {
        flex-direction: column;
    }

    .promo-btn {
        width: 100%;
    }

    .promo-details strong {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }

    .promo-details span {
        display: block;
    }
}
