/*-----------------------------------------------------------------------------
 * Bootstrap 5.3 radius variables
 *
 * The selector list in this file is Bootstrap 4 era. BS 5.3 computes its radii
 * from CSS variables and rounds several elements with selectors this file never
 * matches - `.card-header:first-child` (0,2,0) beats the plain `.card-header`
 * (0,1,0) below, which is why a card's top corners stayed curved even though
 * `.card` itself was squared. Zeroing the variables catches every one of them:
 * cards and their inner corners, modals, dropdowns, form controls, selects,
 * list groups, alerts, toasts, accordions, progress bars, and the `rounded-*`
 * utilities.
 *
 * --bs-border-radius-pill is deliberately left alone: a pill is a shape choice,
 * not a stray corner. .rounded-circle uses a literal 50% and is unaffected.
 *---------------------------------------------------------------------------*/

:root {
	--bs-border-radius: 0;
	--bs-border-radius-sm: 0;
	--bs-border-radius-lg: 0;
	--bs-border-radius-xl: 0;
	--bs-border-radius-xxl: 0;
	--bs-border-radius-2xl: 0;
}

/* BS derives this one with calc(radius - border-width), i.e. -1px. Browsers
   clamp a negative radius to 0, but set it outright so nothing depends on that. */
.card {
	--bs-card-border-radius: 0;
	--bs-card-inner-border-radius: 0;
}

.rounded,
.img-thumbnail,
.img-thumbnail img,
code,
pre,
.form-control,
.form-control-sm,
.form-group-sm .form-control,
.form-control-lg,
.form-group-lg .form-control,
.btn,
.btn-group-lg > .btn,
.btn-sm,
.btn-group-sm > .btn,
.btn-xs,
.btn-group-xs > .btn,
.dropdown-menu,
.input-group-lg > .form-control,
.input-group-lg > .input-group-btn > .btn,
.input-group-sm > .form-control,
.input-group-sm > .input-group-btn > .btn,
.input-group-rounded input.form-control:first-child,
.input-group-rounded input.form-control:last-child,
.checkbox-custom label::before,
.nav-tabs > li > a,
.nav-tabs.nav-justified > li > a,
.nav-pills > li > a,
.nav-tabs-justified > li > a,
.navbar,
.navbar-toggle,
.navbar-toggle .icon-bar,
.breadcrumb,
.pagination,
.pager li > a,
.pager li > span,
.label,
.badge,
.container .jumbotron,
.container-fluid .jumbotron,
.thumbnail,
.alert,
.progress,
.progress.progress-border-radius,
.progress.progress-border-radius .progress-bar,
.progress-bar,
.progress-bar-tooltip,
.progress-xs.progress-half-rounded,
.progress-xs.progress-half-rounded .progress-bar,
.progress-sm.progress-half-rounded,
.progress-sm.progress-half-rounded .progress-bar,
.progress-md.progress-half-rounded,
.progress-md.progress-half-rounded .progress-bar,
.progress-lg.progress-half-rounded,
.progress-lg.progress-half-rounded .progress-bar,
.progress-xl.progress-half-rounded,
.progress-xl.progress-half-rounded .progress-bar,
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br,
.card,
.card-group .card,
.card-header + .card-body,
.card-header,
.card-body,
.card-group .card-accordion .card-body,
.card-footer,
.card-horizontal .card-header + .card-body,
.card-horizontal .card-header,
.card-group .card-accordion .card-header,
html .card .card-header-transparent + .card-body,
.card-group .card-accordion .card-header a,
.card-group .card-accordion.card-accordion-first .card-header,
.modal-content,
.tooltip-inner,
.popover,
.popover-title,
.call-to-action,
.carousel-indicators li,
.pagination > li:first-child > a,
.pagination > li:first-child > span,
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span,
.pagination > li:last-child > a,
.pagination > li:last-child > span,
.pagination-lg > li:last-child > a,
.pagination-lg > li:last-child > span,
.progress .progress-bar,
.input-group-icon input.form-control:first-child,
.input-group-icon input.form-control:last-child {
	border-radius: 0;
}

.body-sign .card-sign .card-title-sign .title,
.body-sign .card-sign .card-body,
.sidebar-left .sidebar-header .sidebar-toggle,
.simple-compose-box,
.timeline .tm-title,
ul.simple-card-list li,
.timeline .tm-items > li .tm-box,
.rounded,
.fc .fc-toolbar .fc-button,
.fc-event,
.fc-state-default.fc-corner-right,
.media-gallery ul.mg-tags > li a,
.media-gallery .mg-files .thumbnail,
.media-gallery .mg-files .thumbnail .thumb-preview img,
.media-gallery .mg-files .thumbnail .thumb-preview .mg-thumb-options .mg-zoom,
html .scroll-to-top,
.style-switcher .style-switcher-open,
.style-switcher .options-links a,
.search-results-list a,
p.drop-caps.secondary:first-child::first-letter,
.tabs,
.nav-tabs li a,
.tab-content,
.tabs.tabs-bottom .tab-content,
.tabs.tabs-bottom .nav-tabs li a,
.tabs-left .tab-content,
.tabs-left .nav-tabs > li:first-child a,
.tabs-left .nav-tabs > li:last-child a,
.tabs-right .tab-content,
.tabs-right .nav-tabs > li:first-child a,
.tabs-right .nav-tabs > li:last-child a,
.nav-tabs.nav-justified li:first-child a,
.nav-tabs.nav-justified li:first-child a:hover,
.nav-tabs.nav-justified li:last-child a,
.nav-tabs.nav-justified li:last-child a:hover,
.tabs.tabs-bottom .nav.nav-tabs.nav-justified li:first-child a,
.tabs.tabs-bottom .nav.nav-tabs.nav-justified li:last-child a,
.tabs-navigation,
.tabs-navigation .nav-tabs > li:first-child a,
.tabs-navigation .nav-tabs > li:last-child a,
.toggle > label,
.toggle.toggle-simple .toggle > label,
.toggle.toggle-simple .toggle > label:after,
.pricing-table h3,
.pricing-table .plan,
.widget-twitter-profile .profile-quote,
.btn-group-vertical > .btn:first-child:not(:last-child),
.btn-group-vertical > .btn:last-child:not(:first-child),
.btn-group-vertical > .btn:first-child:not(:last-child),
.btn-group-vertical > .btn:last-child:not(:first-child),
.ui-pnotify .notification,
.owl-theme .owl-nav [class*="owl-"],
.dd-handle,
.scrollable .scrollable-slider,
.form-group-vertical .form-control:first-child,
.form-group-vertical .form-control:first-of-type,
.form-group-vertical .form-control:last-child,
.form-group-vertical .form-control:last-of-type,
.form-group-vertical .input-group.input-group-icon:first-child .form-control,
.form-group-vertical .input-group.input-group-icon:first-of-type .form-control,
.form-group-vertical .input-group.input-group-icon:last-child .form-control,
.form-group-vertical .input-group.input-group-icon:last-of-type .form-control,
.select2-container--bootstrap .select2-selection,
.select2-container--bootstrap .select2-dropdown,
.select2-container--bootstrap .select2-search--dropdown .select2-search__field,
.btn-group > .btn-group:nth-child(2) > .multiselect.btn,
.bootstrap-tagsinput,
.note-editor
	.note-toolbar
	.btn-group
	> .btn-group:last-child
	> .btn:first-child,
.note-editor
	.btn-group
	> .btn:first-child:not(:last-child):not(.dropdown-toggle),
.note-editor .btn-group > .btn:last-child:not(:first-child),
.note-editor .btn-group > .dropdown-toggle:not(:first-child),
.note-editor .btn,
html.boxed .inner-wrapper,
html.boxed .header,
html.boxed .content-body {
	border-radius: 0;
}

@media (min-width: 768px) {
	.nav-tabs.nav-justified > li > a,
	.nav-tabs-justified > li > a,
	.navbar {
		border-radius: 0;
	}
}

@media (max-width: 479px) {
	.tabs .nav.nav-tabs.nav-justified li:first-child a,
	.tabs .nav.nav-tabs.nav-justified li:first-child a:hover,
	.tabs.tabs-bottom .nav.nav-tabs.nav-justified li:last-child a,
	.tabs.tabs-bottom .nav.nav-tabs.nav-justified li:last-child a:hover {
		border-radius: 0;
	}
}

/*-----------------------------------------------------------------------------
 * !important overrides
 *
 * theme.css squares nothing it has marked !important, and an !important beats
 * the plain `border-radius: 0` above no matter the specificity or load order.
 * The one that shows: `.card-header { border-radius: 5px 5px 0 0 !important }`
 * (theme.css) - a card's top corners stay curved even when .card itself is
 * square, which is exactly where a .card-featured accent bar sits. Porto's own
 * `.card-featured .card-header { border-radius: 0 }` has no !important, so it
 * loses to its own rule.
 *
 * Deliberately NOT listed: .card-header-icon (55px) and
 * .card-header-profile-picture img (50px) - those are circles by design.
 *---------------------------------------------------------------------------*/

.card,
.card-header,
.card-header:first-child,
.card-body,
.card-header + .card-body,
.card-footer,
.card-footer:last-child,
.card-footer-btn-group,
.card-img,
.card-img-top,
.card-img-bottom,
.card-img-overlay,
.card > .list-group:first-child,
.card > .list-group:last-child,
.card.card-modern,
.card-horizontal .card-header,
.card-horizontal .card-header + .card-body,
.card-horizontal .card-footer,
.accordion .card-header,
.accordion .card-body,
ul.simple-card-list li,
div.simple-card-list .card .card-content,
.tab-navigation nav > ul > li > a,
.spinner-buttons.btn-group-vertical .btn:first-child,
.spinner-buttons.btn-group-vertical .btn:last-child,
.rounded {
	border-radius: 0 !important;
}
