/* General Container Styles */
.apc-container {
    margin: 2rem auto;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
}

/* Card Styles */
.apc-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

/* Header Styles */
.apc-card-header h1,
.apc-card-header h2 {
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.apc-card-header p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

.apc-card-header a {
    color: var(--apc-main-color, #16a34a);
    text-decoration: none;
    font-weight: 500;
}

.apc-card-header a:hover {
    text-decoration: underline;
}

/* Body and Form Element Styles */
.apc-card-body input[type="url"],
.apc-card-body input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.apc-card-body input[type="url"]:focus,
.apc-card-body input[type="text"]:focus {
    outline: none;
    border-color: var(--apc-main-color, #16a34a);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Button Styles */
.apc-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    background-color: var(--apc-main-color, #16a34a);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 0.5rem;
}

.apc-btn:hover {
    filter: brightness(1.1);
}

/* Loading Section */
.apc-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--apc-main-color, #16a34a);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section Styles */
.apc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.apc-results-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 1rem;
    text-align: right;
}
.apc-results-table tr:last-child td {
    border-bottom: none;
}
.apc-results-table td:last-child {
    font-weight: bold;
    text-align: left;
    color: #1f2937;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

.apc-shipping-title {
    font-weight: bold;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.apc-shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.apc-shipping-option:hover {
    border-color: var(--apc-main-color, #16a34a);
}

.apc-shipping-option.apc-selected {
    border-color: var(--apc-main-color, #16a34a);
    background-color: rgba(22, 163, 74, 0.05);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.apc-shipping-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-weight: 500;
}
.apc-shipping-info div:last-child {
    font-weight: bold;
}

.apc-footer-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 1.5rem;
}

/* Modal for alerts */
.apc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    direction: rtl;
}

.apc-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.apc-modal-content p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.apc-modal-close-btn {
    background-color: var(--apc-main-color, #16a34a);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}
