/**
 * Cancellation Policies CSS
 */

/* Policy Display */
.refund-pro-cancellation-policy {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.refund-pro-cancellation-policy.policy-style-compact {
    padding: 15px;
    font-size: 14px;
}

.refund-pro-cancellation-policy.policy-style-detailed {
    padding: 25px;
    border: 2px solid #0073aa;
}

.policy-title {
    color: #0073aa;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.policy-description {
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

.policy-rules h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.refund-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.refund-rule {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 5px;
    font-size: 13px;
}

.refund-rule:last-child {
    margin-bottom: 0;
}

/* Policy Selector */
.refund-pro-policy-selector {
    margin: 15px 0;
}

.refund-pro-policy-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.refund-pro-policy-selector .required {
    color: #d63638;
}

.refund-pro-policy-select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.policy-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

.policy-preview-content h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.policy-preview-content .policy-description {
    margin-bottom: 10px;
    font-style: italic;
    color: #666;
}

.policy-preview-content .policy-rules {
    margin-top: 10px;
}

.policy-preview-content .refund-rules-list {
    margin: 5px 0;
    padding-left: 20px;
}

.policy-preview-content .refund-rules-list li {
    list-style: disc;
    margin-bottom: 3px;
    font-size: 13px;
}

.policy-actions {
    margin-top: 10px;
}

.create-custom-policy {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.create-custom-policy:hover {
    text-decoration: underline;
}

/* Modal Styles */
.refund-pro-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.refund-pro-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
}

.refund-pro-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.refund-pro-modal-close:hover {
    color: #000;
}

.refund-pro-modal h3 {
    margin-top: 0;
    color: #0073aa;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rule-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.rule-input input {
    width: auto;
    flex: 1;
    margin: 0;
}

.remove-rule-btn {
    background: #d63638;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-rule-btn:hover {
    background: #b71c1c;
}

#add-rule-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

#add-rule-btn:hover {
    background: #005a87;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.form-actions button[type="submit"] {
    background: #0073aa;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: #005a87;
}

.form-actions .cancel-btn {
    background: #f0f0f1;
    color: #50575e;
}

.form-actions .cancel-btn:hover {
    background: #dcdcde;
}

/* Calculator Styles */
.refund-pro-calculator {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.refund-pro-calculator h3 {
    margin-top: 0;
    color: #0073aa;
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.calculator-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.calculator-form input,
.calculator-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.calculate-refund {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.calculate-refund:hover {
    background: #005a87;
}

.calculator-results {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

.calculator-result h4 {
    margin: 0 0 15px 0;
    color: #0073aa;
}

.calculator-result p {
    margin: 5px 0;
    font-size: 14px;
}

.calculator-result .refund-amount {
    font-size: 16px;
    color: #0073aa;
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .refund-pro-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
    }
    
    .rule-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rule-input input {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Error States */
.refund-pro-error {
    color: #d63638;
    background: #fcf2f2;
    border: 1px solid #f5b7b1;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Success States */
.refund-pro-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}